Skip to content

Share the selection between Tilesets view and Tileset Editor#3768

Open
bjorn wants to merge 1 commit intomapeditor:masterfrom
bjorn:shared-tileset-selection
Open

Share the selection between Tilesets view and Tileset Editor#3768
bjorn wants to merge 1 commit intomapeditor:masterfrom
bjorn:shared-tileset-selection

Conversation

@bjorn
Copy link
Member

@bjorn bjorn commented Jun 29, 2023

Now TilesetDocument owns a single TilesetModel and associated QItemSelectionModel, which are used by the TilesetView instances in the TilesetDock as well as in the TilesetEditor.

@bjorn
Copy link
Member Author

bjorn commented Jun 29, 2023

@eishiya noted on Discord that it would be good to address issue #3654 before making a change like this, especially if it's non-optional.

@bjorn bjorn force-pushed the shared-tileset-selection branch from 9fd7669 to 4c2ab41 Compare August 18, 2023 11:04
@bjorn bjorn force-pushed the shared-tileset-selection branch from 4c2ab41 to ec6b9e2 Compare June 17, 2024 11:22
@bjorn bjorn force-pushed the shared-tileset-selection branch 2 times, most recently from 9297068 to 0c4d7fe Compare August 21, 2025 10:47
@bjorn
Copy link
Member Author

bjorn commented Aug 21, 2025

Patch was broken during one of the rebases. A helpful message was printed to the console when opening a tileset in the Tileset Editor:

QAbstractItemView::setSelectionModel() failed: Trying to set a selection model, which works on a different model than the view.

Of course we needed to use the model from the TilesetDocument.

Now TilesetDocument owns a single TilesetModel and associated
QItemSelectionModel, which are used by the TilesetView instances in the
TilesetDock as well as in the TilesetEditor.
@bjorn bjorn force-pushed the shared-tileset-selection branch from 0c4d7fe to 7a2c8ce Compare February 4, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant